var express = require('express');
var router = express.Router();
const uitl = require('../common/util');

/**
 * @swagger
 * /:
 *   get:
 *     tags:
 *       - 默认路由
 *     summary: 获取网站的提示信息
 *     description: 默认路由
 *     responses:
 *       200:
 *         description: 默认路由响应
 */

/* GET home page. */
router.get('/', function(req, res) {
  data = {
    siteName: '校园二手交易平台',
    description: '基于Express.js + Vue.js技术开发',
    clintIp: uitl.getReqRemoteIP(req), 
    siteIpc: "赣ICP备2021000000号"
  };
  res.send(uitl.FormatJSONData(200,"获取成功",data));
});

module.exports = router;
